Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev/mail#13 - All members should not be excluded from Smart unsubscribe group #12246

Closed
wants to merge 2 commits into from

Conversation

lolcodeca
Copy link

Overview

https://lab.civicrm.org/dev/mail/issues/13

All unsubscribe group members are excluded from a mailing with a manually specified unsubscribe group (group_type=Base) if the unsubscribe group is a Smart group.

To reproduce: Create a smart group with some members in it. Some members may also be added and removed manually as usual. Search for some contacts including some who are in that smart group and choose the action to send/schedule a bulk email. When creating the mail select the Smart group as your unsubscribe group.

The expected result: The mailing is not sent to any contacts in the search who are in the smart un-subscribe group with the status "Removed".

Before

The result: The mailing is not sent to any contacts in the search who are in the smart un-subscribe group at all.

After

The expected result

@civicrm-builder
Copy link

Can one of the admins verify this patch?

@JoeMurray
Copy link
Contributor

@monishdeb please review and discuss with @lcdservices

@seamuslee001
Copy link
Contributor

Jenkins ok to test

@seamuslee001
Copy link
Contributor

@lolcodeca can you please fix the style issue our test bot has found https://test.civicrm.org/job/CiviCRM-Core-PR/20981/checkstyleResult/new/

@monishdeb
Copy link
Member

monishdeb commented Jun 5, 2018

Thanks, @lolcodeca for submitting this PR. This is a regression and it caused during refactoring getRecipients(), in particular at this point where we were supposed to exclude only those smart group(s) which are marked as 'Excluded' and the patch here retain that condition and thus by that it doesn't exclude the contacts which are present in Base table is already included in the recipient listing.

I have extended a UT for this fix in PR #12261 which will fail as it is depended on this PR fix.

@monishdeb
Copy link
Member

After discussing with @eileenmcnaughton I have created a new 5.2 rc PR #12262 after cherry-picking commits from both the PR. Hence closing this PR in favor of that.

@monishdeb monishdeb closed this Jun 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants